package cn.tedu.review;
/**本类用于OOP的知识回顾*/
public class TestCar {
    public static void main(String[] args) {
        Car c=new Car();
//        c.brand="BMW";
//        c.length=3.1;
//        c.color="活力橙";
//        c.price=200000.98;
//        System.out.println(c.brand);
//        System.out.println(c.price);
//        System.out.println(c.length);
//        System.out.println(c.color);
        c.start();
//        c.stop();
        c.setBrand("特斯拉");
        c.setColor("石墨绿");
        c.setLength(2.9);
        c.setPrice(210000.99);
        System.out.println(c.getBrand());
        System.out.println(c.getColor());
        System.out.println(c.getLength());
        System.out.println(c.getPrice());

    }

}
class Car{
    private String brand;
    private String color;
    private double price;
    private double length;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public void start(){
        System.out.println("汽车启动");
        stop();
    }
    private void stop(){
        System.out.println("汽车停止");
    }


}
